package org.dromara.system.api.services;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.system.api.domain.bo.RemoteLogininforBo;
import org.dromara.system.api.domain.bo.RemoteOperLogBo;
import org.dromara.system.api.feign.SystemLogClient;
import org.springframework.stereotype.Service;

/**
 * @author: zhou shuai
 * @date: 2024/10/6 10:52
 * @version: v1
 */
@Slf4j
@Service("sysLogApiService")
@RequiredArgsConstructor
public class SysLogApiService {

    private final SystemLogClient systemLogClient;

    /**
     * 保存系统日志
     *
     * @param remoteOperLogBo 日志实体
     */
    public void saveLog(RemoteOperLogBo remoteOperLogBo) {
        systemLogClient.saveLog(remoteOperLogBo);
    }

    /**
     * 保存访问记录
     *
     * @param remoteLogininforBo 访问实体
     */
    public void saveLogininfor(RemoteLogininforBo remoteLogininforBo) {
        systemLogClient.saveLogininfor(remoteLogininforBo);
    }

}
